import { createRouter, createWebHistory } from "vue-router";

import Home from "../views/home.vue";
import About from "../views/about.vue";
import DetailOne from "../views/detail-one.vue";
import DetailTwo from "../views/detail-two.vue";

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/home",
      name: "home",
      component: Home,
    },
    {
      path: "/about",
      name: "about",
      component: About,
    },
    {
      path: "/one",
      name: "one",
      component: DetailOne,
    },
    {
      path: "/two/:id",
      name: "two",
      component: DetailTwo,
    },
  ],
});

export default router;
